import channel from './broadcast/channel.coffee'
import {hook} from './broadcast/on.coffee'

export default new Proxy(
  =>
  get:(self, name)=>
    (...args)=>
      for i from hook
        i[name]?(...args)
      args.unshift name
      channel.postMessage args
      return
)



